<script src="../node_modules/@vue/reactivity/dist/reactivity.global.js"></script>
<script>
  const { effect, computed, reactive } = VueReactivity;

  const data = reactive({
    foo: 1,
    bar: 2,
  });

  const sum = computed(() => {
    return data.foo + data.bar;
  });

  // data.foo = 'hello'
  // console.log(sum.value);
  // console.log(sum.value);
  // console.log(sum.value);

  effect(() => {
    console.log(sum.value);
  });

  data.foo = 100;
  data.bar = 200;
</script>
